import Vue from 'vue';
import VueI18n from 'vue-i18n';
// import Cookies from 'js-cookie';
import zhCNLocale from 'element-ui/lib/locale/lang/zh-CN';
import zhCN from './zh-CN';
import enLocale from 'element-ui/lib/locale/lang/en';
import en from './en';
import jaLocale from 'element-ui/lib/locale/lang/ja';
import ja from './ja';
import ptLocale from 'element-ui/lib/locale/lang/pt';
import pt from './pt';


Vue.use(VueI18n);

export const messages = {
  'zh-CN': {
    _lang: '简体中文',
    ...zhCN,
    ...zhCNLocale,
  },
  en: {
    _lang: 'english',
    ...en,
    ...enLocale,
  },
  ja: {
    _lang: 'Japanese',
    ...ja,
    ...jaLocale,
  },
  cn: {
    _lang: '简体中文',
    ...zhCN,
    ...zhCNLocale,
  },
  // 葡萄牙语
  pt: {
    _lang: '葡萄牙语',
    ...pt,
    ...ptLocale,
  },
};



export default new VueI18n({
  // locale: Cookies.get('language') || 'zh-CN',
  locale: 'zh-CN',
  messages,
});
